home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Text Processing / BBEdit 2.5.6 Updater / ToolServer Support / Copy to MPW folder / BBEditStartup•411 < prev   
Text File  |  1994-02-13  |  3KB  |  85 lines

  1. #    BBEditStartup•411
  2. #    version 2.2d1
  3. #    August 21, 1992
  4. #    Copyright ©1992 Richard M. Siegel
  5. #
  6.  
  7. #    411 startup script for use with BBEdit 2.2 and ToolServer.
  8. #    This script is a modified version of the UserStartup•Help script
  9. #    that comes with MPW 411. Because of the limitations of ToolServer,
  10. #    some functionality is not available, but the basic template and
  11. #    lookup functions are available.
  12.  
  13. #    Do not install this script unless you have 411 installed.
  14.  
  15. #    This script is derived from the 411 "UserStartup•Help" script,
  16. #    copyright ©1991, 1992 Apple Computer Inc.
  17.  
  18. #
  19. #        To automatically mount your 411 file server when MPW launches...
  20. #
  21. #     Set the "Help_Server" variable to the "zone:server:volume" where your "411"
  22. #    help folder resides.  Requires the MPW 3.2 Choose command.
  23. #
  24.     
  25.     Set Help_Server     ""  # "Development Tools:Okefenokee:The Star:"
  26.     Set Guest           0    # set to 1 # if you want to log on as guest, else set to 0.
  27.     
  28.     IF "{Help_Server}" != ""
  29.         if not "`Exists "{Help_Server}"`"
  30.             IF {Guest}
  31.                 Choose "{Help_Server}"  -guest
  32.             Else
  33.                 Choose "{Help_Server}"  -u "{User}" -askpw
  34.             End
  35.         End
  36.     End
  37.  
  38. #    Set type of header - default is abreviated header
  39.  
  40.     Set headerStyle    -h2    # Set headerStyle -h # Expanded header -lists all files searched
  41.     
  42. #    Specify the help directory
  43.     
  44.     Set HelpDirectory "{ShellDirectory}Help Folder:"
  45.         
  46. #    Get the location of:
  47. #    ... the 411 directory, 
  48. #    ... the current 411 template and 
  49.  
  50.     if not "`Exists "{HelpDirectory}"`"
  51.         NewFolder "{HelpDirectory}"
  52.     End
  53.  
  54.     if  "`Exists "{HelpDirectory}"Help_Folder`" 
  55.         Set Help_Folder     "`Catenate "{HelpDirectory}"Help_Folder`"; set filesStatus 0;∂
  56.         set exit 0;(set x "`Files "{Help_Folder}"≈Help`") ≥dev:null; Set filesStatus {status}; ∂
  57.         if "{x}" != ""; set filesStatus 1; end; set exit 1; ∂
  58.     End
  59.     
  60.     if not "`Exists "{HelpDirectory}"Help_Folder`" || not "`Exists "{Help_Folder}"`" || !{filesStatus}
  61.         Set exit 0; Set temp "{Boot}"; Loop; ∂
  62.         Set temp "`(GetFileName "{temp}" -q -d -m "Where is your ∂"411∂" folder?")≥dev:null`"; ∂
  63.         if "{temp}"!=""; Echo -n "{temp}" > "{HelpDirectory}"Help_Folder; ∂
  64.         Set Help_Folder "{temp}"; Else; set exit 1; exit; End; ∂
  65.         (set x "`Files "{temp}"≈Help`") ≥dev:null; ∂
  66.         if  "{x}"==""; Alert 411 - The ∂"{temp}∂" folder does not contain Help files.; else; break; end; End; ∂
  67.         set exit 1 ; ∂
  68.     End
  69.  
  70.     if not "`Exists "{HelpDirectory}"Help_Files`"
  71.         Set exit 0;(Files "{Help_Folder}"≈Help -q)≥ dev:null > "{HelpDirectory}"Help_Files;set exit 1
  72.     End
  73.     
  74.     Set Help_Folder     "`Catenate "{HelpDirectory}"Help_Folder`"
  75.  
  76.     Export HelpDirectory
  77.     if not "`Exists "{HelpDirectory}"Help`"
  78.         Echo  > "{HelpDirectory}"Help
  79.     End
  80.  
  81. #    Advise BBEdit that we've started up 411
  82.  
  83.     RBBEdit '411•' ''
  84.  
  85.